<?xml version="1.0" encoding="utf-8" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:iepd="http://dps.state.tx.us/niem/exchange/StandardizedFelonyJudgment/1.0" xmlns:tx="http://dps.state.tx.us/niem/extensions/1.0" xmlns:j="http://niem.gov/niem/domains/jxdm/4.0" xmlns:scr="http://niem.gov/niem/domains/screening/2.0" xmlns:s="http://niem.gov/niem/structures/2.0" xmlns:ansi-nist="http://niem.gov/niem/ansi-nist/2.0" xmlns:nc="http://niem.gov/niem/niem-core/2.0">

<xsl:import href="TXCommon.xslt"/>
<xsl:output method="text" encoding="UTF-8"/>
	<xsl:template match="/">
		<xsl:text>&#10;</xsl:text>
		<xsl:text>                               Case No. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="20"/>
			<xsl:with-param name="data"><xsl:value-of select="//tx:Case/nc:CaseTrackingID"/></xsl:with-param> 
		</xsl:call-template>
		<xsl:text>     Count: </xsl:text>
		<xsl:value-of select="//tx:ChargeCountNumber"/>
		
		<xsl:text>&#10;                                                  Incident No./TRN:</xsl:text>
		<xsl:value-of select="//j:ChargeTrackingIdentification/nc:IdentificationID"/>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;THE STATE OF TEXAS                                          |</xsl:text>
		<xsl:text>     IN THE </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:JurisdictionText"/>
		<xsl:text> DISTRICT</xsl:text>
		<xsl:text>&#10;                                                            |</xsl:text>
		<xsl:text>&#10;v.                                                          |</xsl:text> 
		<xsl:text>     COURT </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/tx:CourtAugmentation/tx:CourtNumber"/>
		<xsl:text>&#10;                                                            |</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
					<xsl:apply-templates select="//j:Subject/nc:RoleOfPersonReference">
						<xsl:with-param name="dataElem">NAME</xsl:with-param>
					</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>|</xsl:text>
		<xsl:text>     </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
		<xsl:text> COUNTY, TEXAS</xsl:text>
		<xsl:text>&#10;STATE ID No.: </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="46"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:Subject/nc:RoleOfPersonReference">
					<xsl:with-param name="dataElem">SID</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>|</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>

		<xsl:apply-templates select="//tx:Case/tx:CaseAugmentation/tx:CommunitySupervisionRevocation"/>
		<xsl:apply-templates select="//tx:Case/tx:CaseAugmentation/tx:CourtAcquittal"/>
		<xsl:apply-templates select="//tx:Case/tx:CaseAugmentation/tx:CourtConviction"/>
		<xsl:apply-templates select="//tx:Case/tx:CaseAugmentation/tx:DeferredAdjudication"/>
		<xsl:apply-templates select="//tx:Case/tx:CaseAugmentation/tx:GuiltAdjudication"/>
		<xsl:apply-templates select="//tx:Case/tx:CaseAugmentation/tx:JuryAcquittal"/>
		<xsl:apply-templates select="//tx:Case/tx:CaseAugmentation/tx:JuryConviction"/>
	</xsl:template>
	
	
	<xsl:template match="tx:Case/tx:CaseAugmentation/tx:CommunitySupervisionRevocation">
		<xsl:text>&#10;                                        JUDGMENT REVOKING COMMUNITY SUPERVISION</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Judge Presiding:                                            </xsl:text>
		<xsl:text> Date Judgment Entered:</xsl:text>
		<xsl:text>&#10;Hon. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="55"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Attorney for State:                                         </xsl:text>
		<xsl:text> Attorney for Defendant:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseProsecutionAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">SELF</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">
			<xsl:apply-templates select="//j:CaseDefenseAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Date of Original Community Supervision Order:               </xsl:text>
		<xsl:text> Statute for Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="//tx:OriginalSupervisionOrderDate/nc:Date"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeStatute/j:StatuteDescriptionText"/>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Offense for which Defendant Convicted:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Date of Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:CaseProsecutionCharge/tx:ChargeAugmentation/tx:OffenseDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Degree of Offense:                                          </xsl:text>
		<xsl:text> Plea to Motion to Revoke:    </xsl:text>
		<xsl:text> Findings on Deadly Weapon:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeDegreeText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="29"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>	
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='false'">N/A</xsl:if>
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='true'">
			<xsl:value-of select="//tx:DeadlyWeapon/tx:DeadlyWeaponDescriptionText"/>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
	
		<!--xsl:value-of select=""/-->
		<xsl:text>&#10;Original Punishment Assessed:  </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ConvictionSentence/j:SentenceDescriptionText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> FINE: $</xsl:text>
		<xsl:value-of select="//tx:OriginalConvictionSentence/tx:SentenceAugmentation/tx:Fine/nc:ObligationTotalAmount"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Shock Commnity Supervision:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:ShockCommunitySupervision/tx:SupervisionDescriptionText"/>
		<xsl:text>          FINE:$</xsl:text>
		<xsl:value-of select="//tx:ShockCommunitySupervision/tx:Fine/nc:ObligationTotalAmount"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Date Sentence Imposed:                                      </xsl:text>
		<xsl:text> Date Sentence to Commence:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentenceImposedDate/nc:Date"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:ConvictionSentence/nc:ActivityDateRange/nc:StartDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Punishment and Place of Confinement:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentencePunishmentCode"/>		
		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;                                        </xsl:text>
		<xsl:value-of select="//tx:ConvictionSentence/j:SentenceGroupingText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Fine:</xsl:text>
		<xsl:text>                         Court Costs:</xsl:text>
		<xsl:text>   Restitution:</xsl:text>
		<xsl:text>   Restitution Payable to:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="28"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:Fine/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CourtCosts/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Restitution/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityPerson">VICTIM	</xsl:if>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityOrganization">AGENCY/AGENT</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;                                        IS ORIGINAL JUDGMENT / SENTENCE REFORMED?  </xsl:text>
		<xsl:if test="//tx:OriginalJudgmentReformedIndicator='true'">YES</xsl:if>
		<xsl:if test="//tx:OriginalJudgmentReformedIndicator='false'">NO</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
			<xsl:text>&#10;</xsl:text>
	<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='false'">
			<xsl:text>Sex Offender Registration Requirements do not apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was N/A</xsl:text>
		</xsl:if>
		<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='true'">
			<xsl:text>Sex Offender Registration Requirements do apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was </xsl:text>
			<xsl:apply-templates select="//tx:SexOffenderVictim/nc:RoleOfPersonReference">
				<xsl:with-param name="dataElem">AGE</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;If Defendant is to serve sentence in TDCJ, enter incarceration periods in chronological order.</xsl:text>
		<xsl:text>&#10;Time Credited:</xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit"/>
		<xsl:text>&#10;If Defendant is to serve sentence in county jail or is given credit toward fine and costs, enter days credited below:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceConfinementCredit/j:SentenceConfinementCreditDayQuantity"/>
		<xsl:text> DAYS		</xsl:text>
		<xsl:text>&#10;NOTES: </xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit/tx:SentenceConfinementCreditDayNoteText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;This cause was called in </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
		<xsl:text>County, Texas.  The State appeared by her District Attorney.</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Counsel / Waiver of Counsel</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">Defendant appeared in person with Counsel</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">Defendant knowingly, intelligently, and voluntarily waived the right to representation by counsel in writing in open court.</xsl:if>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>The State filed a motion to revoke Defendant's community supervision.  After hearing the State's motion, Defendant's plea, the evidence submitted, and reviewing the record, the Court GRANT's the State's motion.  The Court's record indicates that Defendant was previously convicted of a felony offense and punishment was assessed as indicated above.  The record indicates the Court ordered imposition of Defendant's sentence of confinement suspended and placed Defendant on cummunity supervision for </xsl:text>
				<xsl:apply-templates select="//tx:SentenceAugmentation/tx:CommunitySupervision/j:SupervisionAssignedTerm/j:TermDuration"/>
				<xsl:text> YEARS</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>

		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>The Court FINDS Defendant as violated the conditions of community supervision as set out in the State's ORIGINAL Motion to Revoke Community Supervision as follows:</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>Accordingly, the Court ORDERS the previous orders in this cause suspending imposition of sentence of confinement and placing Defendant on community supervision REVOKED.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//tx:OriginalJudgmentReformedIndicator='false'">
					<xsl:text>The Court ORDERS Defendant punished in accordance with the judgment and sentence originally entered in this cause.</xsl:text>
				</xsl:if>
				<xsl:if test="//tx:OriginalJudgmentReformedIndicator='true'">
					<xsl:text>Finding it to be in the interest of justice, the Court ORDERS Defendant punished in accordance with the reformed judgment and sentence indicated above</xsl:text>
				</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;	Punishment:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentencePunishmentCode"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>

		<xsl:text>&#10;The Court ORDERS Defendant's sentence EXECUTED</xsl:text>
		<xsl:text>&#10;The Court ORDERS that Defendant is given credit noted above on this sentence for the time spent incarcerated.</xsl:text>
		<xsl:text>&#10;The Court further ORDERS Defendant to pay all fines, court costs, and restitution as indicated above.</xsl:text>

		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Furthermore, the following special findings or orders apply:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:SpecialOrder"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Signed and entered on:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>(Judge's Signature)</xsl:text>
		<!--
		<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SIGNATURE</xsl:with-param>
		</xsl:apply-templates>
-->
		<xsl:text>&#10;                                                            JUDGE PRESIDING</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:value-of select="//ansi-nist:FingerprintImage/nc:BinaryBase64Object"/>
-->
		<xsl:text>(Judge's Thumbprint)</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            Right Thumbprint</xsl:text>
	</xsl:template>
	
	<xsl:template match="tx:Case/tx:CaseAugmentation/tx:JuryAcquittal">
		<xsl:text>&#10;                                        JUDGMENT OF ACQUITTAL BY JURY</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Judge Presiding:                                            </xsl:text>
		<xsl:text> Date Judgment Entered:</xsl:text>
		<xsl:text>&#10;Hon. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="55"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Attorney for State:                                         </xsl:text>
		<xsl:text> Attorney for Defendant:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseProsecutionAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">SELF</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">
			<xsl:apply-templates select="//j:CaseDefenseAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Charged Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Charging Instrument:                                        </xsl:text>
		<xsl:text> Statute for Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
					<xsl:value-of select="//tx:ChargeInstrumentForm/nc:DocumentTitleText"/>		
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Plea to Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;This cause was called for trial in </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
		<xsl:text> County, Texas.  The State appeared by her District Attorney.</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Counsel / Waiver of Counsel</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">Defendant appeared in person with Counsel</xsl:if>
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">Defendant knowingly, intelligently, and voluntarily waived the right to representation by counsel in writing in open court.</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     It appeared to the Court that Defendant was mentally competent and had pleaded as shown above to the chargin instrument.  Both parties announced ready for trial.  A jury was selected, impaneled, and sworn.  The INDICTMENT was read to the jury, and Defendant entered a plea of </xsl:text>
				<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>		
				<xsl:text> to the charged offense.  The Court received the plea and entered it of record.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The jury heard the evidence submitted and the argument of counsel.  The Court charged the jury as to its duty to determine the guilt or innocence of Defendant, and the jury retired to consider the evidence.  Upon returning to open court, the jury delivered its verdict.  THe Court received the jury's verdict and ordered the verdict entered of record upon the minutes of the Court as follows:</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;		We the Jury, find the defendant </xsl:text>
		<xsl:value-of select="//tx:CaseAugmentation/tx:JuryAcquittal/j:VerdictDescriptionText"/>		
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court ORDERS, ADJUDGES, AND DECREES that Defendant is </xsl:text>
				<xsl:value-of select="//tx:CaseAugmentation/tx:JuryAcquittal/j:VerdictDescriptionText"/>		
				<xsl:text> of the charged offense as FOUND BY THE VERDICT OF THE JURY.  The Court FURTHER ORDERS Defendant immediately discharged.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Signed and entered on:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SIGNATURE</xsl:with-param>
		</xsl:apply-templates>
		-->
		<xsl:text>(Judge's Signature)</xsl:text>
		<xsl:text>&#10;                                                            JUDGE PRESIDING</xsl:text>
		<xsl:text>&#10;</xsl:text>
</xsl:template>

	<xsl:template match="tx:Case/tx:CaseAugmentation/tx:GuiltAdjudication">
		<xsl:text>&#10;                                        JUDGMENT ADJUDICATING GUILT</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Judge Presiding:                                            </xsl:text>
		<xsl:text> Date Judgment Entered:</xsl:text>
		<xsl:text>&#10;Hon. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="55"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Attorney for State:                                         </xsl:text>
		<xsl:text> Attorney for Defendant:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseProsecutionAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">SELF</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">
			<xsl:apply-templates select="//j:CaseDefenseAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Date of Original Community Supervision Order:               </xsl:text>
		<xsl:text> Statute for Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="//tx:OriginalSupervisionOrderDate/nc:Date"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeStatute/j:StatuteDescriptionText"/>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Offense for which Defendant Convicted:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Date of Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:CaseProsecutionCharge/tx:ChargeAugmentation/tx:OffenseDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Degree                                                      </xsl:text>
		<xsl:text> Plea to Motion to Adjudicate: </xsl:text>
		<xsl:text> Findings on Deadly Weapon:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeDegreeText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="29"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>  </xsl:text>	
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='false'">N/A</xsl:if>
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='true'">
			<xsl:value-of select="//tx:DeadlyWeapon/tx:DeadlyWeaponDescriptionText"/>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Terms of Plea Bargain:  </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:ChargePlea/tx:PleaAugmentation/tx:PleaNegotiatedTermsText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Date Sentence Imposed:                                      </xsl:text>
		<xsl:text> Date Sentence to Commence:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentenceImposedDate/nc:Date"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:ConvictionSentence/nc:ActivityDateRange/nc:StartDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Punishment and Place of Confinement:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentencePunishmentCode"/>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>					</xsl:text>
		<xsl:value-of select="//tx:ConvictionSentence/j:SentenceGroupingText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:if test="//j:SentenceSuspendedIndicator='true'">
			<xsl:text>SENTENCE OF CONFINEMENT SUSPENDED, DEFENDANT PLACED ON COMMUNITY SUPERVISION FOR </xsl:text>
					<xsl:call-template name="PrintDuration">
						<xsl:with-param name="Duration"><xsl:value-of select="//tx:CommunitySupervision/j:SupervisionAssignedTerm/j:TermDuration"/></xsl:with-param>
					</xsl:call-template>     	
			
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Fine:</xsl:text>
		<xsl:text>                         Court Costs:</xsl:text>
		<xsl:text>   Restitution:</xsl:text>
		<xsl:text>   Restitution Payable to:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="28"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:Fine/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CourtCosts/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Restitution/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityPerson">VICTIM	</xsl:if>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityOrganization">AGENCY/AGENT</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
			<xsl:text>&#10;</xsl:text>
	<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='false'">
			<xsl:text>Sex Offender Registration Requirements do not apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was N/A</xsl:text>
		</xsl:if>
		<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='true'">
			<xsl:text>Sex Offender Registration Requirements do apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was </xsl:text>
			<xsl:apply-templates select="//tx:SexOffenderVictim/nc:RoleOfPersonReference">
				<xsl:with-param name="dataElem">AGE</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;If Defendant is to serve sentence in TDCJ, enter incarceration periods in chronological order.</xsl:text>
		<xsl:text>&#10;Time Credited:</xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit"/>
		<xsl:text>&#10;If Defendant is to serve sentence in county jail or is given credit toward fine and costs, enter days credited below:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceConfinementCredit/j:SentenceConfinementCreditDayQuantity"/>
		<xsl:text> DAYS		</xsl:text>
		<xsl:text>&#10;NOTES: </xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit/tx:SentenceConfinementCreditDayNoteText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>The Court previously deferred adjudication of guilt in this case.  Subsequently, the Court heard the matter of Defendant's compliance with and obedience to the terms and conditions of the Court's Order of Deferred Adjudication of Guilt.  The State appeared by her District Attorney.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Counsel / Waiver of Counsel</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">Defendant appeared in person with Counsel</xsl:if>
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">Defendant knowingly, intelligently, and voluntarily waived the right to representation by counsel in writing in open court.</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     After hearing and considering the evidence presented by both sides, the Court FINDS THE FOLLOWING:  (1) The Court previously found the Defendant to be qualified for community supervision; (2) The Court DEFERRED further proceedings, made no finding of guilt and rendered no judgment; (3) The Court issued an order placing Defendant on community supervision for a period of </xsl:text>
				<xsl:apply-templates select="//tx:SentenceAugmentation/tx:CommunitySupervision/j:SupervisionAssignedTerm/j:TermDuration"/>
				<xsl:text> YEARS;</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>(4) The Court assessed a fine of $</xsl:text>		
				<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:Fine/nc:ObligationTotalAmount"/>
				<xsl:text>; (5) While on community supervision, Defendant violated the terms and conditions of community supervision as set out in the State's ORIGINAL Motion to Adjudicate Guilt as follows: </xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>Accordingly, the Court GRANTS the State's Motion to Adjudicate the Defendant's Guilt in the above cause.  FINDING the Defendant committed the offense on the date as noted above, the Court ORDERS, ADJUDGES AND DDECREES that Defendant is GUILTY of the offense.  The Court FINDS the Presentence Investigation, if so ordered, was done according to the applicable provisions of TEX. CODE CRIM. PROC. art. 42.12 s9.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court ORDERS Defendant punished as indicated above.  The Court ORDERS Defendant to pay all fines, court costs and restitution as indicated above.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;	Punishment:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentencePunishmentCode"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;	Execution/Suspension of Sentence:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//j:SentenceSuspendedIndicator='false'">
					<xsl:text>&#10;The Court ORDERS Defendant's sentence EXECUTED</xsl:text>
				</xsl:if>
				<xsl:if test="//j:SentenceSuspendedIndicator='true'">
					<xsl:text>&#10;The Court ORDERS Defendant's sentence of confinement SUSPENDED.  The Court ORDERS Defendant placed on community supervision for the adjudged period (above) so long as Defendant abides by and does not violate the terms and conditions of community supervision.  The order setting forth the terms and conditions of community supervision is incorporated into this judgment by reference.</xsl:text>
				</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;The Court ORDERS that Defendant is given credit noted above on this sentence for the time spent incarcerated.</xsl:text>		
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;	Furthermore, the following special findings or orders apply:</xsl:text>
			<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:SpecialOrder"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Signed and entered on:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
			<!--
		<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SIGNATURE</xsl:with-param>
		</xsl:apply-templates>
		-->
		<xsl:text>(Judge's Signature)</xsl:text>
		<xsl:text>&#10;                                                            JUDGE PRESIDING</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:value-of select="//ansi-nist:FingerprintImage/nc:BinaryBase64Object"/>
-->
		<xsl:text>(Judge's Thumbprint)</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            Right Thumbprint</xsl:text>
</xsl:template>

	<xsl:template match="tx:Case/tx:CaseAugmentation/tx:CourtAcquittal">
		<xsl:text>&#10;                                        JUDGMENT OF ACQUITTAL BY COURT</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Judge Presiding:                                            </xsl:text>
		<xsl:text> Date Judgment Entered:</xsl:text>
		<xsl:text>&#10;Hon. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="55"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Attorney for State:                                         </xsl:text>
		<xsl:text> Attorney for Defendant:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseProsecutionAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">SELF</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">
			<xsl:apply-templates select="//j:CaseDefenseAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Charged Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Charging Instrument:                                        </xsl:text>
		<xsl:text> Statute for Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ChargeInstrumentForm/nc:DocumentTitleText"/>	
			</xsl:with-param>
		</xsl:call-template>					
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Plea to Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;This cause was called for trial in </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
		<xsl:text> County, Texas.  The State appeared by her District Attorney.</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Counsel / Waiver of Counsel</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">Defendant appeared in person with Counsel</xsl:if>
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">Defendant knowingly, intelligently, and voluntarily waived the right to representation by counsel in writing in open court.</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     It appeared to the Court that Defendant was mentally competent and had pleaded as shown above to the charging instrument.  Both parties announced ready for trial.  Defendant waived the right of trial by jury and entered the plea indicated above.  The Court received the plea and entered it of record.  Having heard the evidence submitted, the Court FINDS Defendant NOT GUILTY of the charged offense.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court  ORDERS, ADJUDGES, AND DECREES that Defendant is NOT GUILTY of the charged offense.  The Court FURTHER ORDERS Defendant immediately discharged.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Signed and entered on:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SIGNATURE</xsl:with-param>
		</xsl:apply-templates>
		-->
		<xsl:text>(Judge's Signature)</xsl:text>
		<xsl:text>&#10;                                                            JUDGE PRESIDING</xsl:text>
		
</xsl:template>

	<xsl:template match="tx:Case/tx:CaseAugmentation/tx:CourtConviction">
		<xsl:text>&#10;                           JUDGMENT OF CONVICTION BY COURT -- WAIVER OF JURY TRIAL</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Judge Presiding:                                            </xsl:text>
		<xsl:text> Date Judgment Entered:</xsl:text>
		<xsl:text>&#10;Hon. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="55"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Attorney for State:                                         </xsl:text>
		<xsl:text> Attorney for Defendant:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseProsecutionAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">SELF</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">
			<xsl:apply-templates select="//j:CaseDefenseAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Offense for which Defendant Convicted:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Charging Instrument:                                        </xsl:text>
		<xsl:text> Statute for Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
					<xsl:value-of select="//tx:ChargeInstrumentForm/nc:DocumentTitleText"/>		
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Date of Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:CaseProsecutionCharge/tx:ChargeAugmentation/tx:OffenseDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Degree of Offense:                                          </xsl:text>
		<xsl:text> Plea to Offense:         </xsl:text>
		<xsl:text> Findings on Deadly Weapon:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeDegreeText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="25"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>	
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='false'">N/A</xsl:if>
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='true'">
			<xsl:value-of select="//tx:DeadlyWeapon/tx:DeadlyWeaponDescriptionText"/>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
	
		<xsl:text>&#10;Terms of Plea Bargain:  </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:ChargePlea/tx:PleaAugmentation/tx:PleaNegotiatedTermsText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Plea to 1st Enhancement Paragraph:                </xsl:text>
		<xsl:text> Plea to 2nd Enhancement/Habitual Paragraph:  </xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Findings on 1st Enhancement Paragraph:            </xsl:text>
		<xsl:text> Findings on 2nd Enhancement/Habitual Paragraph:  </xsl:text>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Date Sentence Imposed:                            </xsl:text>
		<xsl:text> Date Sentence to Commence:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="50"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentenceImposedDate/nc:Date"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:ConvictionSentence/nc:ActivityDateRange/nc:StartDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Punishment and Place of Confinement:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentencePunishmentCode"/>		
		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;                                        </xsl:text>
		<xsl:value-of select="//tx:ConvictionSentence/j:SentenceGroupingText"/>
			<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:if test="//j:SentenceSuspendedIndicator='true'">
			<xsl:text>SENTENCE OF CONFINEMENT SUSPENDED, DEFENDANT PLACED ON COMMUNITY SUPERVISION FOR </xsl:text>
					<xsl:call-template name="PrintDuration">
						<xsl:with-param name="Duration"><xsl:value-of select="//tx:CommunitySupervision/j:SupervisionAssignedTerm/j:TermDuration"/></xsl:with-param>
					</xsl:call-template>     	
			
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Fine:</xsl:text>
		<xsl:text>                         Court Costs:</xsl:text>
		<xsl:text>   Restitution:</xsl:text>
		<xsl:text>   Restitution Payable to:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="28"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:Fine/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CourtCosts/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Restitution/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityPerson">VICTIM	</xsl:if>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityOrganization">AGENCY/AGENT</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
			<xsl:text>&#10;</xsl:text>
	<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='false'">
			<xsl:text>Sex Offender Registration Requirements do not apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was N/A</xsl:text>
		</xsl:if>
		<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='true'">
			<xsl:text>Sex Offender Registration Requirements do apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was </xsl:text>
			<xsl:apply-templates select="//tx:SexOffenderVictim/nc:RoleOfPersonReference">
				<xsl:with-param name="dataElem">AGE</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;If Defendant is to serve sentence in TDCJ, enter incarceration periods in chronological order.</xsl:text>
		<xsl:text>&#10;Time Credited:</xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit"/>
		<xsl:text>&#10;If Defendant is to serve sentence in county jail or is given credit toward fine and costs, enter days credited below:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceConfinementCredit/j:SentenceConfinementCreditDayQuantity"/>
		<xsl:text> DAYS		</xsl:text>
		<xsl:text>&#10;NOTES: </xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit/tx:SentenceConfinementCreditDayNoteText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;This cause was called for trial in </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
		<xsl:text>County, Texas.  The State appeared by her District Attorney.</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Counsel / Waiver of Counsel</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">Defendant appeared in person with Counsel</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">Defendant knowingly, intelligently, and voluntarily waived the right to representation by counsel in writing in open court.</xsl:if>
		
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     Both parties announced ready for trial.  Defendant waived the right of trial by jury and entered the plea indicated above.  The Court then admonished Defendant as required by law.  It appeared to the Court that Defendant was mentally competent to stand trial, made the plea freely and voluntarily, and was aware of the consequences of this plea.  The Court received the plea and entered it of record.  Having heard the evidence submitted, the Court found Defendant guilty of the offense indicated above.  In the presence of Defendant, the Court pronounced sentence against Defendant.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>

		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court FINDS Defendant commited the above offense and ORDERS, ADJUDGES AND DECREES that Defendant is GUILTY of the above offense.  The Court FINDS the Presentence Investigaiton, if so ordered, was done according to the applicable provisions of TEX. CODE CRIM. PROC. art. 42.12s9.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>

		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
		<xsl:text>     The Court ORDERS Defendant punished as indicated above.  The Court ORDERS Defendant to pay all fines, court costs, and restitution as indicated above.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
				
		<xsl:text>&#10;	Punishment:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentencePunishmentCode"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		
		<xsl:text>&#10;	Execution/Suspension of Sentence:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
			<xsl:if test="//j:SentenceSuspendedIndicator='false'">
				<xsl:text>The Court ORDERS Defendant's sentence EXECUTED</xsl:text>
			</xsl:if>
			<xsl:if test="//j:SentenceSuspendedIndicator='true'">
				<xsl:text>The Court ORDERS Defendant's sentence of confinement SUSPENDED.  The Court ORDERS Defendant placed on community supervision for the adjudged period (above) so long as Defendant abides by and does not violate the terms and conditions of community supervision.  The order setting forth the terms and conditions of community supervision is incorporated into this judgment by reference.</xsl:text>
			</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>

		<xsl:text>&#10;The Court ORDERS that Defendant is given credit noted above on this sentence for the time spent incarcerated.</xsl:text>		
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;	Furthermore, the following special findings or orders apply:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:SpecialOrder"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Signed and entered on:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SIGNATURE</xsl:with-param>
		</xsl:apply-templates>
		-->
		<xsl:text>(Judge's Signature)</xsl:text>
		<xsl:text>&#10;                                                            JUDGE PRESIDING</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:value-of select="//ansi-nist:FingerprintImage/nc:BinaryBase64Object"/>
-->
		<xsl:text>(Judge's Thumbprint)</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            Right Thumbprint</xsl:text>
</xsl:template>
	
	<xsl:template match="tx:Case/tx:CaseAugmentation/tx:JuryConviction">
		<xsl:text>&#10;                                     JUDGMENT OF CONVICTION BY JURY</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Judge Presiding:                                            </xsl:text>
		<xsl:text> Date Judgment Entered:</xsl:text>
		<xsl:text>&#10;Hon. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="55"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Attorney for State:                                         </xsl:text>
		<xsl:text> Attorney for Defendant:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseProsecutionAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">SELF</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">
			<xsl:apply-templates select="//j:CaseDefenseAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Offense for which Defendant Convicted:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Charging Instrument:                                        </xsl:text>
		<xsl:text> Statute for Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
					<xsl:value-of select="//tx:ChargeInstrumentForm/nc:DocumentTitleText"/>		
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Date of Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:CaseProsecutionCharge/tx:ChargeAugmentation/tx:OffenseDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Degree of Offense:                                          </xsl:text>
		<xsl:text> Plea to Offense:         </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeDegreeText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>
		<xsl:text> </xsl:text>	
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Verdict of Jury:                                            </xsl:text>
		<xsl:text> Findings on Deadly Weapon:</xsl:text>
		<xsl:text>&#10;</xsl:text>
			<xsl:call-template name="pad">
				<xsl:with-param name="amount" select="60"/>
				<xsl:with-param name="data">
					<xsl:value-of select="//j:VerdictDescriptionText"/>
				</xsl:with-param>
			</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='false'">N/A</xsl:if>
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='true'">
					<xsl:value-of select="//tx:DeadlyWeapon/tx:DeadlyWeaponDescriptionText"/>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Plea to 1st Enhancement Paragraph:                </xsl:text>
		<xsl:text> Plea to 2nd Enhancement/Habitual Paragraph:  </xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Findings on 1st Enhancement Paragraph:            </xsl:text>
		<xsl:text> Findings on 2nd Enhancement/Habitual Paragraph:  </xsl:text>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>


		<xsl:text>&#10;Punishment Assessed By:        </xsl:text>
		<xsl:text> Date Sentence Imposed:        </xsl:text>
		<xsl:text> Date Sentence to Commence:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="31"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentenceImposerCode"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="30"/>
			<xsl:with-param name="data">
				<xsl:call-template name="FormatDate">
					<xsl:with-param name="FullDate">
						<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentenceImposedDate/nc:Date"/>
					</xsl:with-param>
				</xsl:call-template>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:ConvictionSentence/nc:ActivityDateRange/nc:StartDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Punishment and Place of Confinement:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentencePunishmentCode"/>		
		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;                                        </xsl:text>
		<xsl:value-of select="//tx:ConvictionSentence/j:SentenceGroupingText"/>
			<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:if test="//j:SentenceSuspendedIndicator='true'">
			<xsl:text>SENTENCE OF CONFINEMENT SUSPENDED, DEFENDANT PLACED ON COMMUNITY SUPERVISION FOR </xsl:text>
					<xsl:call-template name="PrintDuration">
						<xsl:with-param name="Duration"><xsl:value-of select="//tx:CommunitySupervision/j:SupervisionAssignedTerm/j:TermDuration"/></xsl:with-param>
					</xsl:call-template>     	
			
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Fine:</xsl:text>
		<xsl:text>                         Court Costs:</xsl:text>
		<xsl:text>   Restitution:</xsl:text>
		<xsl:text>   Restitution Payable to:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="28"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:Fine/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CourtCosts/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Restitution/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityPerson">VICTIM	</xsl:if>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityOrganization">AGENCY/AGENT</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
			<xsl:text>&#10;</xsl:text>
	<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='false'">
			<xsl:text>Sex Offender Registration Requirements do not apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was N/A</xsl:text>
		</xsl:if>
		<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='true'">
			<xsl:text>Sex Offender Registration Requirements do apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was </xsl:text>
			<xsl:apply-templates select="//tx:SexOffenderVictim/nc:RoleOfPersonReference">
				<xsl:with-param name="dataElem">AGE</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;If Defendant is to serve sentence in TDCJ, enter incarceration periods in chronological order.</xsl:text>
		<xsl:text>&#10;Time Credited:</xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit"/>
		<xsl:text>&#10;If Defendant is to serve sentence in county jail or is given credit toward fine and costs, enter days credited below:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceConfinementCredit/j:SentenceConfinementCreditDayQuantity"/>
		<xsl:text> DAYS		</xsl:text>
		<xsl:text>&#10;NOTES: </xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit/tx:SentenceConfinementCreditDayNoteText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;This cause was called for trial in </xsl:text>
		<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
		<xsl:text>County, Texas.  The State appeared by her District Attorney.</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Counsel / Waiver of Counsel</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">Defendant appeared in person with Counsel</xsl:if>
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">Defendant knowingly, intelligently, and voluntarily waived the right to representation by counsel in writing in open court.</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     It appeared to the Court that Defendant was mentally competent and had pleaded as shown above to the charging instrument.  Both parties announced ready for trial.  A jury was selected, impaneled and sworn.  The INDICTMENT was read to the jury, and Defendant entered a plea to the charged offense.  The Court received the plea and entered it of record.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The jury heard the evidence submitted and argument of counsel.  The Court charged the jury as to its duty to determine the guilt or innocence of Defendant, and the jury retired to consider the evidence.  Upon returning to open court, the jury delivered its verdict in the presence of Defendant and defense counsel, if any.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;	The court received the verdict and ORDERED it entered upon the minutes of the Court.</xsl:text>
		
			<xsl:text>&#10;	Punishment Assessed by Jury/Court/No election:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:SentenceImposerCode"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court FINDS Defendant committed the above offense and ORDERS, ADJUDGES AND DECREES that Defendant is GUILTY of the above offense.  The Court FINDS the Presentence Investigation, if so ordered, was done according to the applicable provisions of TEX. CODE CRIM. PROC. art. 42.12s9.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court ORDERS Defendant punished as indicated above.  The Court ORDERS Defendant to pay all fines, court costs, and restitution as indicated above.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		
		<xsl:text>&#10;	Punishment:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:SentencePunishmentCode"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//j:SentenceSuspendedIndicator='false'">
					<xsl:text>The Court ORDERS Defendant's sentence EXECUTED</xsl:text>
				</xsl:if>
				<xsl:if test="//j:SentenceSuspendedIndicator='true'">
					<xsl:text>The Court ORDERS Defendant's sentence of confinement SUSPENDED.  The Court ORDERS Defendant placed on community supervision for the adjudged period (above) so long as Defendant abides by and does not violate the terms and conditions of community supervision.  The order setting forth the terms and conditions of community supervision is incorporated into this judgment by reference.</xsl:text>
				</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>

		<xsl:text>&#10;	Furthermore, the following special findings or orders apply:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:SpecialOrder"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Signed and entered on:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SIGNATURE</xsl:with-param>
		</xsl:apply-templates>
		-->
		<xsl:text>(Judge's Signature)</xsl:text>
		<xsl:text>&#10;                                                            JUDGE PRESIDING</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:value-of select="//ansi-nist:FingerprintImage/nc:BinaryBase64Object"/>
-->
		<xsl:text>(Judge's Thumbprint)</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            Right Thumbprint</xsl:text>
</xsl:template>

	<xsl:template match="tx:Case/tx:CaseAugmentation/tx:DeferredAdjudication">
		<xsl:text>&#10;                                        ORDER OF DEFERRED ADJUDICATION</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Judge Presiding:                                            </xsl:text>
		<xsl:text> Date Order Entered:</xsl:text>
		<xsl:text>&#10;Hon. </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="55"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Attorney for State:                                         </xsl:text>
		<xsl:text> Attorney for Defendant:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:apply-templates select="//j:CaseProsecutionAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
				</xsl:apply-templates>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">SELF</xsl:if>
		<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">
			<xsl:apply-templates select="//j:CaseDefenseAttorney/nc:RoleOfPersonReference">	
					<xsl:with-param name="dataElem">NAME</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Charging Instrument:                                        </xsl:text>
		<xsl:text> Statute for Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ChargeInstrumentForm/nc:DocumentTitleText"/>	
			</xsl:with-param>
		</xsl:call-template>					
		<xsl:text> </xsl:text>
		<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeStatute/j:StatuteDescriptionText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Date of Offense:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:CaseProsecutionCharge/tx:ChargeAugmentation/tx:OffenseDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Degree of Offense:                                          </xsl:text>
		<xsl:text> Plea to Offense:         </xsl:text>
		<xsl:text> Findings on Deadly Weapon:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="60"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CaseProsecutionCharge/j:ChargeDegreeText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="25"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ChargePlea/j:PleaDescriptionText"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> </xsl:text>	
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='false'">N/A</xsl:if>
		<xsl:if test="//tx:DeadlyWeapon/tx:DeadlyWeaponUsedIndicator='true'">
			<xsl:value-of select="//tx:DeadlyWeapon/tx:DeadlyWeaponDescriptionText"/>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
	
		<xsl:text>&#10;Terms of Plea Bargain:  </xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:ChargePlea/tx:PleaAugmentation/tx:PleaNegotiatedTermsText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
		<xsl:text>&#10;Plea to 1st Enhancement Paragraph:                </xsl:text>
		<xsl:text> Plea to 2nd Enhancement/Habitual Paragraph:  </xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Findings on 1st Enhancement Paragraph:            </xsl:text>
		<xsl:text> Findings on 2nd Enhancement/Habitual Paragraph:  </xsl:text>		
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>

		<xsl:text>&#10;				ADJUDICATION OF GUILT DEFERRED;</xsl:text>
		<xsl:text>&#10;				DEFENDANT PLACED ON COMMUNITY SUPERVISION</xsl:text>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;		       PERIOD OF COMMUNITY SUPERVISION:   </xsl:text>
		<xsl:call-template name="PrintDuration">
			<xsl:with-param name="Duration"><xsl:value-of select="//tx:CommunitySupervision/j:SupervisionAssignedTerm/j:TermDuration"/></xsl:with-param>
		</xsl:call-template>     	
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Fine:</xsl:text>
		<xsl:text>                         Court Costs:</xsl:text>
		<xsl:text>   Restitution:</xsl:text>
		<xsl:text>   Restitution Payable to:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="28"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:ConvictionSentence/tx:SentenceAugmentation/tx:Fine/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:CourtCosts/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>$ </xsl:text>
		<xsl:call-template name="pad">
			<xsl:with-param name="amount" select="13"/>
			<xsl:with-param name="data">
				<xsl:value-of select="//tx:Restitution/nc:ObligationTotalAmount"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityPerson">VICTIM	</xsl:if>
		<xsl:if test="//tx:Restitution/tx:ObligationRecipient/nc:EntityOrganization">AGENCY/AGENT</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		
			<xsl:text>&#10;</xsl:text>
	<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='false'">
			<xsl:text>Sex Offender Registration Requirements do not apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was N/A</xsl:text>
		</xsl:if>
		<xsl:if test="//j:SentenceRegisterSexOffenderIndicator='true'">
			<xsl:text>Sex Offender Registration Requirements do apply to the Defendant.  TEX. CODE CRIM. PROC. chapter 62.</xsl:text>
			<xsl:text>&#10;The age of the victim at the time of the offense was </xsl:text>
			<xsl:apply-templates select="//tx:SexOffenderVictim/nc:RoleOfPersonReference">
				<xsl:with-param name="dataElem">AGE</xsl:with-param>
			</xsl:apply-templates>
		</xsl:if>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;If Defendant is to serve sentence in TDCJ, enter incarceration periods in chronological order.</xsl:text>
		<xsl:text>&#10;Time Credited:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="//tx:SentenceConfinementCredit/j:SentenceConfinementCreditDayQuantity"/>
		<xsl:text> DAYS		</xsl:text>
		<xsl:text>&#10;NOTES: </xsl:text>
		<xsl:apply-templates select="//tx:SentenceConfinementCredit/tx:SentenceConfinementCreditDayNoteText"/>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;</xsl:text>
		
		
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>This cause was called for trial in </xsl:text>
				<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
				<xsl:text>County, Texas.  The State appeared by her District Attorney.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;Counsel / Waiver of Counsel</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='false'">Defendant appeared in person with Counsel</xsl:if>
				<xsl:if test="//j:CaseDefendantSelfRepresentationIndicator='true'">Defendant knowingly, intelligently, and voluntarily waived the right to representation by counsel in writing in open court.</xsl:if>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     Both parties announced ready for trial.  Defendant waived the right of trial by jury and entered a plea as indicated above.  The Court admonished the Defendant as required by law.  It appeared to the Court that Defendant was mentally competent to stand trial, made the plea freely and voluntarily, and was aware of the consequences of theis plea.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>The Court received the plea and entered it of record.  Having heard the evidence submitted, the Court FINDS such evidence substantiates Defendant's guilt.  The Court FINDS that, in this cause, it is in the best interest of society and Defendant to defer proceedings without entering an adjudication of guilt and to place Defendant on community supervision.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court FINDS the Presentence Investigation, if so ordered, was done according to the applicable provisions of TEX. CODE CRIM. PROC. art. 42.12s9.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court ORDERS that Defendant is given credit noted above for the time spent incarcerated.  he Court ORDERS Defendant to pay all fines, court costs, and restitution as indicated above.</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:text>     The Court ORDERS that no judgment shall be entered at this time.  The Court further ORDERS that Defendant be placed on community supervision for the adjudged period so long as Defendant abides by and does not violate the terms and conditions of community supervision.  See TEX. CODE CRIM. PROC. art. 42.12s5(a).	</xsl:text>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;	Furthermore, the following special findings or orders apply:</xsl:text>
		<xsl:call-template name="wrapIn">
			<xsl:with-param name="Text">
				<xsl:apply-templates select="//tx:SpecialOrder"/>
			</xsl:with-param>
			<xsl:with-param name="StartPos" select="0"/>
			<xsl:with-param name="EndPos" select="120"/>
			<xsl:with-param name="WrapedStartPos" select="0"/>
			<xsl:with-param name="CurrentPos" select="121"/>
			<xsl:with-param name="WrapWidth" select="121"/>
			<xsl:with-param name="initialRun" select="0"/>
		</xsl:call-template>
		<xsl:text>&#10;________________________________________________________________________________________________________________________</xsl:text>
		<xsl:text>&#10;Signed and entered on:</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="//tx:JudgmentEnteredDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:apply-templates select="//j:CaseJudge/nc:RoleOfPersonReference">	
				<xsl:with-param name="dataElem">SIGNATURE</xsl:with-param>
		</xsl:apply-templates>
		-->
		<xsl:text>(Judge's Signature)</xsl:text>
		<xsl:text>&#10;                                                            JUDGE PRESIDING</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<xsl:text>&#10;                                                            </xsl:text>
		<!--
		<xsl:value-of select="//ansi-nist:FingerprintImage/nc:BinaryBase64Object"/>
-->
		<xsl:text>(Judge's Thumbprint)</xsl:text>
		<xsl:text>&#10;</xsl:text>
		<xsl:text>&#10;                                                            Right Thumbprint</xsl:text>
</xsl:template>


<!--
	<xsl:value-of select=""/>
	-->
	<xsl:template match="tx:SpecialOrder">
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="tx:SpecialOrderName"/>
		<xsl:text>:&#10;</xsl:text>
		<xsl:value-of select="tx:SpecialOrderDescription"/>
		<xsl:text>&#10;</xsl:text>
	</xsl:template>
	
	<xsl:template match="tx:SentenceAugmentation/tx:CommunitySupervision/j:SupervisionAssignedTerm/j:TermDuration">
		<xsl:value-of select="substring-before(substring-after(.,'P'),'Y')"/>
	</xsl:template>
	
	<xsl:template match="*/nc:RoleOfPersonReference">
		<xsl:param name="dataElem">NAME</xsl:param>
		<xsl:variable name="Subject">
			<xsl:value-of select="@s:ref"/>
		</xsl:variable>
			
		<xsl:choose>
			<xsl:when test="$dataElem='NAME'">
				<xsl:value-of select="//*[@s:id=$Subject]/nc:PersonName/nc:PersonGivenName"/>
				<xsl:text> </xsl:text>
				<xsl:value-of select="//*[@s:id=$Subject]/nc:PersonName/nc:PersonMiddleName"/>
				<xsl:text> </xsl:text>
				<xsl:value-of select="//*[@s:id=$Subject]/nc:PersonName/nc:PersonSurName"/>
			</xsl:when>
			<xsl:when test="$dataElem='SID'">
				<xsl:value-of select="//*[@s:id=$Subject]/nc:PersonStateIdentification/nc:IdentificationID"/>
			</xsl:when>
			<xsl:when test="$dataElem='AGE'">
				<xsl:value-of select="//*[@s:id=$Subject]/nc:PersonAgeMeasure/nc:MeasurePointValue"/>
			</xsl:when>
			<xsl:when test="$dataElem='SIGNATURE'">
				<xsl:value-of select="//*[@s:id=$Subject]/nc:PersonDigitizedSignatureImage/nc:BinaryBase64Object"/>
			</xsl:when>
		</xsl:choose>
		
	</xsl:template>
	<xsl:template match="tx:SentenceConfinementCredit">
		<xsl:text>&#10;From: </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="tx:SentenceConfinementCreditDateRange/nc:StartDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
		<xsl:text> To: </xsl:text>
		<xsl:call-template name="FormatDate">
			<xsl:with-param name="FullDate">
				<xsl:value-of select="tx:SentenceConfinementCreditDateRange/nc:EndDate/nc:Date"/>
			</xsl:with-param>
		</xsl:call-template>
	</xsl:template>
	
	<xsl:template match="tx:SentenceConfinementCredit/tx:SentenceConfinementCreditDayNoteText">
		<xsl:text>&#10;</xsl:text>
		<xsl:value-of select="."/>
	</xsl:template>
	
	<xsl:template match="tx:SentencePunishmentCode">
		<xsl:choose>
			<xsl:when test="//tx:SentencePunishmentCode='StateJail'">
				<xsl:text>&#10;Confinement in State Jail or Institutional Division.  The Court ORDERS the authorized agent of the State of Texas or the Sheriff of this County to take, safely convey, and deliver Defendant to the Director, Institutional Divisin, TDCJ.  THe Court ORDERS Defendant to be confined for the period and in the manner indicated above.  The Court ORDERS Defendant remanded to the custody of the Sheriff of this county until the Sheriff can obey the directions of this sentence.  The Court ORDERS that upon release from confinement, Defendant proceed immediately to the </xsl:text>
<!-- proceed where? -->
				<xsl:text>.  Once there, the Court ORDERS Defendant to pay, or make arrangements to pay, any remaining unpaid fines, court costs, and restitution as ordered by the Court above.</xsl:text>
			</xsl:when>
			<xsl:when test="//tx:SentencePunishmentCode='CountyJail'">
				<xsl:text>&#10;County Jail -- Confinement / Confinement in Lieu of Payment.  The Court ORDERS Defendant immediately committed to the custody of the SHeriff of </xsl:text>
				<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
				<xsl:text> County, Texas on the date the sentence is to commence.  Defendant shall be confined in the </xsl:text>
				<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
				<xsl:text> County Jail for the period indicated above.  The Court ORDERS that upon release from confinement, Defendant shall proceed immediately to the </xsl:text>
				
				<xsl:text>.  Once there, the Court ORDERS Defendant to pay, or make arrangements to pay, any remaining unpaid fines, court costs, and restitution as ordered by the Court above.</xsl:text>
			</xsl:when>
			<xsl:when test="//tx:SentencePunishmentCode='FineOnly'">
				<xsl:text>&#10;Fine Only Payment.  The punishment assesst against Defendant is for a FINE ONLY.  The Court ORDERS Defendant to proceed immediately to the Office of the </xsl:text>
				<xsl:value-of select="//tx:CaseCourt/j:OrganizationAugmentation/j:OrganizationJurisdiction/nc:LocationCountyName"/>
				<xsl:text> County.  Once there, the Court ORDERS Defendant to pay or make arrangements to pay all fines and court costs as ordered by the Court in this cause.</xsl:text>
			</xsl:when>

		</xsl:choose>
	</xsl:template>

	
	<xsl:template match="tx:SentenceImposerCode">
		<xsl:choose>
			<xsl:when test="//tx:SentenceImposerCode='JRY'">
				<xsl:text>&#10;JURY.  Defendant entered a plea and filed a written election to have the jury assess punishment.  The jury heard evidence relative to the question of punishment.  The Court charged the jury and it retired to consider the question of punishment.  After due deliberation, the jury was brought into Court, and, in open court, it returned its verdict as indicated above</xsl:text>
			</xsl:when>
			<xsl:when test="//tx:SentenceImposerCode='CRT'">
				<xsl:text>&#10;COURT.  Defendant elected to have the Court assess punishment.  After hearing evidence relative to the question of punishment, the Court assessed Defendant's punishment as indicated above.</xsl:text>
			</xsl:when>
			<xsl:when test="//tx:SentenceImposerCode='NE'">
				<xsl:text>&#10;No Election.  Defendant did not file a written election as to whether the judge or jury should assess punishment.  After hearing evidence relative to the question of punishment, the Court assessed Defendant's punishment as indicated above.</xsl:text>
			</xsl:when>
		</xsl:choose>
	</xsl:template>

	<xsl:template name="PrintDuration">
		<xsl:param name="Duration"/>
		<xsl:if test="contains($Duration,'Y')">
			<xsl:value-of select="substring-before(substring-after($Duration,'P'),'Y')"/>
			<xsl:text> Years </xsl:text>
			<xsl:if test="contains($Duration,'M')">
				<xsl:value-of select="substring-before(substring-after($Duration,'Y'),'M')"/>
				<xsl:text> Months </xsl:text>
				<xsl:if test="contains($Duration,'D')">
					<xsl:value-of select="substring-before(substring-after($Duration,'M'),'D')"/>
					<xsl:text> Days </xsl:text>
				</xsl:if>
			</xsl:if>
			<xsl:if test="not(contains($Duration,'M'))">
				<xsl:if test="contains($Duration,'D')">
					<xsl:value-of select="substring-before(substring-after($Duration,'Y'),'D')"/>
					<xsl:text> Days </xsl:text>
				</xsl:if>
			</xsl:if>
		</xsl:if>
		<xsl:if test="not(contains($Duration,'Y'))">
			<xsl:if test="contains($Duration,'M')">
				<xsl:value-of select="substring-before(substring-after($Duration,'P'),'M')"/>
				<xsl:text> Months </xsl:text>
				<xsl:if test="contains($Duration,'D')">
					<xsl:value-of select="substring-before(substring-after($Duration,'M'),'D')"/>
					<xsl:text> Days </xsl:text>
				</xsl:if>
			</xsl:if>
			<xsl:if test="not(contains($Duration,'M'))">
				<xsl:if test="contains($Duration,'D')">
					<xsl:value-of select="substring-before(substring-after($Duration,'P'),'D')"/>
					<xsl:text> Days </xsl:text>
				</xsl:if>
			</xsl:if>
		</xsl:if>

	</xsl:template>
	
	
		
	
</xsl:stylesheet>



	

